﻿using LiteDB;
using System;
using System.Collections.Generic;
using System.Drawing;

namespace DevelopTool.Model.DbModels.TableRelation
{
    /// <summary>
    /// 表关系节点
    /// </summary>
    [Serializable]
    public class TableRelationNode
    {
        /// <summary>
        /// 标题（表名）
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 输入集合
        /// </summary>
        public List<string> InputOptions { get; set; }

        /// <summary>
        /// 输出集合
        /// </summary>
        public List<string> OutputOptions { get; set; }

        /// <summary>
        /// 在画布中的位置
        /// </summary>
        public Rectangle Rectangle { get; set; }

        /// <summary>
        /// 节点相关数据
        /// </summary>
        public TableRelationNodeData Data { get; set; }
    }

    [Serializable]
    public class TableRelationNodeData
    {
        public string Owner { get; set; }

        public string TableName { get; set; }

        public string Num_Rows { get; set; }

        public string Comments { get; set; }

        public string Tablespace_Name { get; set; }

        public DbInfo DbInfo { get; set; }

        [BsonIgnore]
        public object TreeNode { get; set; }
    }
}
